package com.zengqingfa.juc.n4;

import lombok.SneakyThrows;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author zengqingfa
 * @className MyServlet
 * @description
 * @create 2021/6/10 23:21
 */
public class MyServlet6 extends HttpServlet {

    // 是否安全？ 线程不安全，servlet是单个，成员变量被线程共享
    private UserService userService = new UserServiceImpl6();

    @SneakyThrows
    public void doGet(HttpServletRequest request, HttpServletResponse response) {
        userService.update("abc");
    }

}

